<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<World author="" date="" language="es" moduleName="" parserVersion="" type="" version="" worldDir="." worldName="">
<IdeMetaInf>
<View xoffset="-89.19543342178474" yoffset="-232.19543342178576" zoom="1.2141948843950543"/>
<Node class="org.f2o.absurdum.puck.gui.graph.RoomNode" name="localidad" x="59" y="100"/>
<Node class="org.f2o.absurdum.puck.gui.graph.RoomNode" name="vestuario" x="60" y="40"/>
<Node class="org.f2o.absurdum.puck.gui.graph.RoomNode" name="psis" x="240" y="40"/>
<Node class="org.f2o.absurdum.puck.gui.graph.RoomNode" name="contenedores" x="60" y="200"/>
<Node class="org.f2o.absurdum.puck.gui.graph.RoomNode" name="puertas" x="-160" y="80"/>
<Node class="org.f2o.absurdum.puck.gui.graph.RoomNode" name="doors" x="-160" y="20"/>
<Node class="org.f2o.absurdum.puck.gui.graph.RoomNode" name="sonidos" x="260" y="120"/>
<Node class="org.f2o.absurdum.puck.gui.graph.RoomNode" name="graficos" x="-120" y="120"/>
<Node class="org.f2o.absurdum.puck.gui.graph.CharacterNode" name="pepe" x="320" y="20"/>
<Node class="org.f2o.absurdum.puck.gui.graph.CharacterNode" name="baby" x="60" y="-40"/>
<Node class="org.f2o.absurdum.puck.gui.graph.CharacterNode" name="jugador" x="-60" y="200"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="entrada" x="0" y="140"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="tapas" x="-40" y="-60"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="pies" x="160" y="20"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="babuchas" x="160" y="-60"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="cabeza" x="20" y="-100"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="sombrero" x="120" y="-100"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="cuerpo" x="-40" y="0"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="nulleitor" x="60" y="-140"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="Llave" x="-200" y="80"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="puerta española" x="-100" y="80"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="puerta americana" x="-100" y="20"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="llave americana" x="-200" y="20"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="fregadero" x="140" y="200"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="plato" x="200" y="200"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="bota" x="260" y="80"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="cuchara" x="260" y="200"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="armario" x="0" y="300"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="cajon" x="60" y="320"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="sobre" x="140" y="160"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="matrioska4" x="200" y="340"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="matrioska3" x="240" y="300"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="matrioska2" x="280" y="260"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="pelota" x="-120" y="200"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="pez" x="-60" y="280"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="objeto_patron" x="60" y="-180"/>
<Node class="org.f2o.absurdum.puck.gui.graph.ItemNode" name="matrioska1" x="140" y="340"/>
<Node class="org.f2o.absurdum.puck.gui.graph.AbstractEntityNode" name="ayuda" x="240" y="-120"/>
<Node class="org.f2o.absurdum.puck.gui.graph.AbstractEntityNode" name="media" x="300" y="-120"/>
<Node class="org.f2o.absurdum.puck.gui.graph.AbstractEntityNode" name="fisica" x="300" y="-60"/>
</IdeMetaInf>
<Code language="BeanShell"><![CDATA[//objeto mundo

include("lib/noaccents.bsh");


String preprocessCommand ( Player jugador , String cadenaCompleta )
{
 	 String nuevaCadena = noaccents_preprocessCommand ( jugador , cadenaCompleta );
	 nuevaCadena = nuevaCadena.toLowerCase(); 
	 nuevaCadena = nuevaCadena.replaceAll( "limpiale " , "limpiar " ); 
	 nuevaCadena = nuevaCadena.replaceAll( "limpiarle " , "limpiar " );
	 nuevaCadena = nuevaCadena.replaceAll( "dale " , "dar " ); 
	 nuevaCadena = nuevaCadena.replaceAll( "darle " , "dar " ); 
	 nuevaCadena = nuevaCadena.replaceAll( "describir " , "mirar " );
	 nuevaCadena = nuevaCadena.replaceAll( "metel" , "meterl" ); //para meterlo
	 nuevaCadena = nuevaCadena.replaceAll( "ponselo" , "mivestir" );
	 nuevaCadena = nuevaCadena.replaceAll( "ponsela" , "mivestir" );
	 nuevaCadena = nuevaCadena.replaceAll( "ponersela" , "mivestir" );
	 nuevaCadena = nuevaCadena.replaceAll( "ponerselo" , "mivestir" );
     //if ( equals(cadenaCompleta,"") ) {nuevaCadena =  "enter";}
     

	 return nuevaCadena;
}



void intro( Player aPlayer )
{
//GRAFICOS
//Situación del marco: Descomenta para editar la medida y posicón del marco 
//entity("media").marcoArriba ( 300);	
//entity("media").marcoAbajo ( 300);	
//entity("media").marcoDerecha( 300);	
//entity("media").marcoIzquierda( 300);

//Copia, pega y descomenta una de las siguientes líneas para añadir un gráfico, en el marco que quieras.
//Cambia el nombre del gráfico por el que quieres mostrar.
//entity("media").graficoArriba( "horizontal.svg");
//entity("media").graficoAbajo( "horizontal.svg");
//entity("media").graficoDerecha( "vertical.svg");
//entity("media").graficoIzquierda( "vertical.svg");

//ponemos márgenes a la ventana?
//void setMargins ( int top , int left , int bottom , int right ){} 
      
//color del prompt y de la pantalla


//SONIDO
//Copia, pega y descomenta una de las siguientes líneas para añadir un mp3,wav u ogg, en el lugar que quieras.
//Cambia el nombre del archivo por el que quieres que se escuche.
//entity("media").audio("audio.ogg");
//entity("media").midi("midi.mid");

//GRAMATICA

//nuevos verbos	  
	  world.getLanguage().addVerbEntry("ponle","poner");
	  world.getLanguage().addVerbEntry("pistas","pista");
	  world.getLanguage().addVerbEntry("musica","sonido");
	  world.getLanguage().addVerbEntry("audio","sonido");
	  world.getLanguage().addVerbEntry("salida","salidas");
	  world.getLanguage().addVerbEntry("descripcion","descripcion");
      world.getLanguage().addVerbEntry("misacar","misacar");
      //world.getLanguage().addVerbEntry("enter","enter");
      
//alias
    world.getLanguage().addAlias( "sacar" , "misacar" );
	world.getLanguage().addAlias( "introducir" , "poner" );//meter es poner ? comprobar
	world.getLanguage().addAlias( "meter" , "poner" );
	world.getLanguage().addAlias( "derramar" , "echar" );//comprobar acción echar
    //world.getLanguage().addAlias( "buscar" , "mirar" );      
      
//queremos que no se active la deducción de entradas
//set(aCreature,"noVerbSpellCheck",true);

//no queremos parser robusto para ningún verbo
//world.getLanguage().setAllUnguessable();	

//No queremos parser robusto con este verbo.
//world.getLanguage().setUnguessable("coger");  	

//para que wears tenga asignado un valor booleano.
//set ( item("cabeza") , "wears" , item("sombrero") , false ); 

//añadimos nuestra propia librería de respuestas por defecto.
world.loadMessages(world.getResource("libro.lan"));

//cambiamos puntualmente una respuesta por defecto.
//setNextMessage

//cambiamos el orden de ejecución de las acciones.
//forceCommand (antes)
//enqueueCommand (después)

//comenzamos:

     
    
	
	//aPlayer: jugador al que le hacemos la introducci�n.
	
	aPlayer.forceCommand("mirar\n");
	
	//(...)

}

//sin un end el comando se repetirá para ambos objetos
void parseCommandTwoObjects ( Mobile aCreature , String verb , String args1 , String args2 ,  Entity obj1 , Entity obj2  )
{   
    //aCreature.write("obj1 es "+obj1+" \n");
    //aCreature.write("obj2 es "+obj2+" \n");  
//contendores, poner y sacar
      
	 if(equals(verb,"poner") ){      
        //poner algo a un mobile
	      if (obj1 instanceof Mobile || obj2 instanceof Mobile ){ 
	               aCreature.write("No se va a dejar, ólvidalo.\n");
				end();} 

	    //No hay contenedor
	        if(obj1 instanceof Item && obj1.isContainer()==false && obj2 instanceof Item && obj2.isContainer()==false)
                { aCreature.write("No se puede meter nada ahí.\n");
                   end();} 
       
	        //ordenamos el orden del contenedor y el contenido
	        //el primer objeto es un item contenedor y el segundo es un item 
	        if((obj1 instanceof Item && obj1.isContainer()==true) && (obj2 instanceof Item && obj2.isContainer()==false))
                {
	            Entity obj=obj1;
	            obj1=obj2;
	            obj2 =obj;
	            }


      
	        //el obj1 ya está dentro del contendor
	        if(obj2 instanceof Item && obj2.isContainer()==true && obj2.getContents().contains(obj1)){
			     aCreature.write("Ya está ahí dentro.\n");
				            end();}
                    

            //el jugador no tiene el objeto para meter.
	       if( !aCreature.hasItem(obj1)){
    aCreature.write("el obj1 esta en inventario es "+get (aCreature.hasItem(obj1))+"\n");
             aCreature.write("Antes coge lo que quieres meter ahí dentro.\n");
		       end(); }
   
 
 

         //el objeto que se quiere meter no está en el inventario.
	     if( !aCreature.hasItem(obj1)){
             aCreature.write("Antes coge lo que quieres poner ahí.\n");
		       end(); }

	         //el obj2 es contenedor  y el personaje tiene el objeto               
	     	if(obj2 instanceof Item && obj2.isContainer()==true && aCreature.hasItem(obj1)){
			    if(get(obj2,"closed")== true ){
                    aCreature.write("la matrioska está cerrada.\n");
                    end();}
                    
                if(obj1.getVolume() > obj2.getVolume()){
                    aCreature.write("No cabe ahí dentro.\n");
                    end();}
                    
			 	 //entity("fisica").poniendo(obj1, obj2);
	             //Para contruir la frase con nombre y su artículo. "constructName2 ( 1 , mobile("jugador")"
	             aCreature.write("Pones "+ obj1.constructName2 ( 1 , mobile("jugador") )+" en "+ obj2.constructName2 ( 1 , mobile("jugador") )+"\n");
	             //aCreature.removeItem(obj1);
			     end();
               } 

     }   
      

           
	if(equals(verb,"misacar")){
        //el obj2 es una localidad y se quiere llevar el obj1 hacia allí  
        if(obj1 instanceof Room){   
	       aCreature.forceCommand("empujar "+obj2.getTitle()+" a "+obj1.getTitle()); 
                end();}     
        if(obj2 instanceof Room){   
	       aCreature.forceCommand("empujar "+obj1.getTitle()+" en "+obj2.getTitle()); 
              end();}
    }
    

    //No sirve para cosas como "coger/sacar patito con el gancho."
    //Lo tomará como "coger/sacar patito del gancho."
	/*if(equals(verb,"coger") || equals(verb,"misacar")){
              
         //Ordenamos contenedor y contenido en caso de que primero se haya mencionado al contenedor          
         if(obj1 instanceof Item && obj1.isContainer() && obj1.getContents().contains(obj2) ) 
            { Entity obj =obj1;
              obj1 = obj2;
              obj2 = obj; 
              } 
               
 		//el obj1 está dentro del obj2    
		if (obj2 instanceof Item && obj2.isContainer() && obj2.getContents().contains(obj1) ) 
			{ aCreature.forceCommand("Coger "+obj1.getTitle()); 
                end();} 
                
        //el obj1 no está dentro del obj2.        
   	    else{aCreature.write("Eso no está ahí...\n"); 
              end();}
     }  */

	//poner
	if ( (equals(verb,"dejar")) && (!args1.contains("aCreature")))
		{ 
            if(obj2 instanceof Item && obj2.isContainer())
	           aCreature.forceCommand("poner "+obj1.getTitle()+" en "+obj2.getTitle());
	             end();
             
	               }     
}


         
         





void parseCommand( Mobile aCreature , String verb , String args , Entity target )
{ aCreature.write("Desde target\n");
    if ( equals(verb,"coger")){ 
    //si el objeto es un psi y no es uno mismo...
        if( target instanceof Mobile && !equals(aCreature,target)){
        aCreature.write("No se va a dejar.\n");end();}
        //si el objeto es fijo.     
        if( target instanceof Item && !target.isGettable()){
           aCreature.write("No puedes coger eso.\n");end();}     
        //si ya tiene el objeto
	    if(target instanceof Item && aCreature.hasItem(target)){
	        aCreature.write("Pero si ya tienes eso...\n");end();}   
        //el objeto está dentro de un contenedor profundo   
   
    } 	
}






void parseCommand( Mobile aCreature , String verb , String args )
{aCreature.write("Desde general \n");
   //entradas incompletas  
   if(equals(verb,"misacar")){aCreature.write("¿De dónde quieres sacar eso?\n"); end(); } 
		         
   if(equals(verb,"dar")){aCreature.write("¿A quién se lo quieres dar?\n"); end(); }     
           
        //entradas complejas
	if (equals(verb,"tocar")){		
		 if (!args1.contains("aCreature")){ 
		  aCreature.write("Dejas tus huellas dactilares sobre algo llamado " + args1 +".\n");
		       end();} 
	      else if (args1.contains("aCreature")){self.write("Eres real, no lo dudes.\n"); 
		          end();}
		}
	
}]]></Code>
<PlayerList>
<Player id="jugador"/>
</PlayerList>
<VisualConfiguration>
<Colors>
<Story color="#ffffff"/>
<Information color="#ffffff"/>
<Default color="#ffffff"/>
<Input color="#ffffff"/>
<Description color="#ffffff"/>
<Foreground color="#ffffff"/>
<Important color="#ffffff"/>
<Denial color="#ffffff"/>
<Action color="#ffffff"/>
<Background color="#000000"/>
<Error color="#ff0000"/>
</Colors>
<Font filename="" name="Courier New" size="20.0"/>
</VisualConfiguration>
<Rooms>
<Room name="localidad">
<DescriptionList>
<Description>Puertolandia es el país de las puertas.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[//localidad


void parseCommand( Mobile aCreature , String verb , String args )
{


}]]></Code>
<PathList>
<Path destination="sonidos" direction="este" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
<Path destination="graficos" direction="oeste" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
<Path destination="contenedores" direction="sur" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
<Path destination="vestuario" direction="norte" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
<Path destination="psis" direction="este" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
</PathList>
<Inventory>
<ItemRef id="entrada"/>
</Inventory>
<MobileList/>
<RelationshipList>
<Relationship id="sonidos">
<PropertyList/>
</Relationship>
<Relationship id="graficos">
<PropertyList/>
</Relationship>
<Relationship id="contenedores">
<PropertyList/>
</Relationship>
<Relationship id="vestuario">
<PropertyList/>
</Relationship>
<Relationship id="psis">
<PropertyList/>
</Relationship>
<Relationship id="entrada">
<PropertyList/>
</Relationship>
</RelationshipList>
</Room>
<Room name="vestuario">
<DescriptionList>
<Description>Es el vestuario, sirve para probarse prendas de vestir, y de guerrear.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<PathList>
<Path destination="localidad" direction="sur" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
</PathList>
<Inventory/>
<MobileList>
<MobRef id="baby"/>
</MobileList>
<RelationshipList>
<Relationship id="localidad">
<PropertyList/>
</Relationship>
<Relationship id="baby">
<PropertyList/>
</Relationship>
</RelationshipList>
</Room>
<Room name="psis">
<DescriptionList/>
<ExtraDescriptionList/>
<PropertyList/>
<PathList>
<Path destination="localidad" direction="oeste" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
</PathList>
<Inventory/>
<MobileList>
<MobRef id="pepe"/>
</MobileList>
<RelationshipList>
<Relationship id="localidad">
<PropertyList/>
</Relationship>
<Relationship id="pepe">
<PropertyList/>
</Relationship>
</RelationshipList>
</Room>
<Room name="contenedores">
<DescriptionList>
<Description>Un lugar en donde probar contenedores.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList>
<PropertyEntry name="secuencia" timeUnitsLeft="0" value="1"/>
</PropertyList>
<Code language="BeanShell"><![CDATA[//contenedores


/*void parseCommandOnContentsGeneric ( Mobile aCreature , String verb , String args1 , String args2 , Vector path1 , Vector path2 , Entity obj1 , Entity obj2 )
{
   aCreature.write("desde mundo onContents "+verb+ "\n obj1 es \n"+obj1+ "\n obj2 es "+obj2+"\n");//"args1 "+args1+"\nargs2 "+args2+ "\n path1 es "+path1+ "\npath2 es "+path2+ " goesFirst es "+goesFirst+ "\n");               
   aCreature.write("desde mundo onContents path1 es "+path1+ "\npath2 es "+path2+"\n\n\n");
   
      //me falta comprobar que el contenedor no esté cerrado
      if(equals(verb,"misacar")) //ejemplo: saca la cuchara del plato.
      {   
          //la cuchara no esta dentro de ningun contenedor
	      if ( path1.size() == 1 )
		    {aCreature.write("Eso no está dentro de ningún sitio.\n"); end();}

          
          //hay dos objetos y uno de ellos es la cuchara
		  if( (obj2 != null && path1.size() > 1) )
           {    
                //si el obj1 es la cuchara y el obj2 es el objeto nombrado en segundo lugar
               if (equals(obj1,path1.get(0))&& equals(obj2,path2.get(0)))
			   { 
                //si el obj2 contiene al obj1                  
		         if (obj2.getContents().contains(obj1) )
                    {  aCreature.forceCommand("Coger "+obj1.getTitle()); end();} 
		          else{aCreature.write("Eso no está ahí dentro...\n"); end();}
               }
           }
           
          
          //queremos sacar la cuchara pero no decimos de donde
          //dado que la cuchara ya ha pasado el filtro que indica si está dentro de algo...
          if(obj2==null)
	        {  //Dado que aunque no haya obj2, sigue habiendo 2 objetos comprobamos que la cuchara es el objeto nombrado por el jugador
              // if(equals(obj1,path1.get(0)))
              // {	                
                String contenido =  path1.get(0).getTitle();
	            String continente = path1.get(1).getTitle();
	            aCreature.write("el "+contenido+" está dentro de "+continente+"\n");
	            aCreature.write("misacar "+contenido+" de "+continente+"\n");
                aCreature.forceCommand("Sacar "+contenido+" de "+continente); 
	             end();
               //}
	        }
      }
}
*/]]></Code>
<PathList>
<Path destination="localidad" direction="norte" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
</PathList>
<Inventory>
<ItemRef id="cajon"/>
<ItemRef id="pez"/>
<ItemRef id="fregadero"/>
<ItemRef id="armario"/>
<ItemRef id="sobre"/>
<ItemRef id="matrioska1"/>
<ItemRef id="matrioska4"/>
<ItemRef id="matrioska3"/>
<ItemRef id="matrioska2"/>
</Inventory>
<MobileList>
<MobRef id="jugador"/>
</MobileList>
<RelationshipList>
<Relationship id="localidad">
<PropertyList/>
</Relationship>
<Relationship id="cajon">
<PropertyList/>
</Relationship>
<Relationship id="pez">
<PropertyList/>
</Relationship>
<Relationship id="fregadero">
<PropertyList/>
</Relationship>
<Relationship id="armario">
<PropertyList/>
</Relationship>
<Relationship id="sobre">
<PropertyList/>
</Relationship>
<Relationship id="matrioska1">
<PropertyList/>
</Relationship>
<Relationship id="matrioska4">
<PropertyList/>
</Relationship>
<Relationship id="matrioska3">
<PropertyList/>
</Relationship>
<Relationship id="matrioska2">
<PropertyList/>
</Relationship>
<Relationship id="jugador">
<PropertyList/>
</Relationship>
</RelationshipList>
</Room>
<Room name="puertas">
<DescriptionList/>
<ExtraDescriptionList/>
<PropertyList/>
<PathList/>
<Inventory/>
<MobileList/>
<RelationshipList/>
</Room>
<Room name="doors">
<DescriptionList/>
<ExtraDescriptionList/>
<PropertyList/>
<PathList/>
<Inventory/>
<MobileList/>
<RelationshipList/>
</Room>
<Room name="sonidos">
<DescriptionList>
<Description>Un lugar para probar sonidos</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[//sonidos



void parseCommand( Mobile aCreature , String verb , String args )
{
    aCreature.write("astart toca audio\nastop para el audio\nmstart toca midi\nmstop para el midi\n");
	
	if ( equals(verb,"astart") )
    {
        aCreature.playAudioIfAvailable(world.getWorldPath()+"multimedia/entertainer.ogg");
        aCreature.write("Tocando audio...\n");
        end();   
    }
    else if ( equals(verb,"astop") )
    {
        aCreature.stopAudioIfAvailable(world.getWorldPath()+"multimedia/entertainer.ogg");
        aCreature.write("Parando audio...\n");
        end();  
    }
    if ( equals(verb,"mstart") )
    {
        aCreature.playMidiIfAvailable(world.getWorldPath()+"multimedia/accion2.mid");
        aCreature.write("Tocando midi...\n");
        end();   
    }
    else if ( equals(verb,"mstop") )
    {
        aCreature.stopMidiIfAvailable();
        aCreature.write("Parando midi...\n");
        end();  
    }

}]]></Code>
<PathList>
<Path destination="localidad" direction="oeste" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
</PathList>
<Inventory>
<ItemRef id="bota"/>
</Inventory>
<MobileList/>
<RelationshipList>
<Relationship id="localidad">
<PropertyList/>
</Relationship>
<Relationship id="bota">
<PropertyList/>
</Relationship>
</RelationshipList>
</Room>
<Room name="graficos">
<DescriptionList>
<Description>Un lugar en donde probar graficos</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[// graficos]]></Code>
<PathList>
<Path destination="localidad" direction="este" exitTime="0" standard="true">
<PropertyList/>
<DescriptionList/>
<CommandList/>
</Path>
</PathList>
<Inventory/>
<MobileList/>
<RelationshipList>
<Relationship id="localidad">
<PropertyList/>
</Relationship>
</RelationshipList>
</Room>
</Rooms>
<Items>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="entrada" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames/>
<PluralNames/>
<SingularReferenceNames/>
<PluralReferenceNames>
<Name>entradas</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>Son dos hojitas de papel translúcido unidas por un lado, una de color verde y la otra de color rosa. Parecen ser tan valiosas como el dinero y son de Alberta. \n</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[//entradas


void parseCommand( Mobile aCreature , String verb , String args )
{


	if(equals(verb,"romper"))
	{
		mobile("baby").write("Con la minuciosidad que a veces caracteriza a los bebés, vas arrancando trocitos de papel que caen sobre tus pies tras hacer algunas piruetas dignas del mejor paracaidista.\n");

		end();				
     }
  


  
}]]></Code>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="tapas" openable="false" type="wearable" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description properName="true">las tapas</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>tapas</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Son las tapas de un libro de cuentos.\n
-Las llevas puestas a modo de... de... bueno, digamos que tienes cierta pinta de “hombre anuncio”.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<WearableSpecs>
<WearableLimbs>
<Requirement>
<Name>cuerpo</Name>
</Requirement>
</WearableLimbs>
<DamageList/>
</WearableSpecs>
<PropertyList/>
<Code language="BeanShell"><![CDATA[void parseCommandOnContentsObj2 ( Mobile aCreature , String verb , String args1 , String args2 , Vector path1 , Vector path2 ,  Entity obj1  )
{
/*	if(equals(verb,"desvestir")){
     aCreature-write("¡Ni se te ocurra! \n-Recuerda que soy un cuento de niños.\n");
        end();}
     if(equals(verb,"mirar")){ 
      aCreature.write("Es la ropa que llevas puesta y es de una firma de diseño.\nHaz el favor de no jugar con ella.\n");
        end();}*/


}]]></Code>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="pies" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>pies</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>pies</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>pies</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[//pies]]></Code>
<RelationshipList>
<Relationship id="babuchas">
<PropertyList>
<PropertyEntry name="wears" timeUnitsLeft="-1" value="true"/>
</PropertyList>
</Relationship>
</RelationshipList>
</Item>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="babuchas" openable="false" type="wearable" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description properName="true">las babuchas</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>babuchas</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Son unas babuchas de seda azul. Parecen sacadas del cuento de “Aladino”.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<WearableSpecs>
<WearableLimbs>
<Requirement>
<Name>pies</Name>
</Requirement>
</WearableLimbs>
<DamageList/>
</WearableSpecs>
<PropertyList/>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="cabeza" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames/>
<PluralNames/>
<SingularReferenceNames/>
<PluralReferenceNames/>
<DescriptionList/>
<ExtraDescriptionList/>
<PropertyList/>
<RelationshipList>
<Relationship id="sombrero">
<PropertyList>
<PropertyEntry name="wears" timeUnitsLeft="-1" value="true"/>
</PropertyList>
</Relationship>
</RelationshipList>
</Item>
<Item canGet="true" closeable="false" gender="true" lockable="false" name="sombrero" openable="false" type="wearable" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>sombrero</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>sombrero</Name>
<Name>gorro</Name>
<Name>pamela</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>todo</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>Es un viejo gorro de papá, aunque todo el mundo se empeña en llamarlo sombrero. \n</Description>
</DescriptionList>
<ExtraDescriptionList/>
<WearableSpecs>
<WearableLimbs>
<Requirement>
<Name>cabeza</Name>
</Requirement>
</WearableLimbs>
<DamageList/>
</WearableSpecs>
<PropertyList/>
<Code language="BeanShell"><![CDATA[//sombrero]]></Code>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="true" lockable="false" name="cuerpo" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames/>
<PluralNames/>
<SingularReferenceNames/>
<PluralReferenceNames/>
<DescriptionList/>
<ExtraDescriptionList/>
<PropertyList/>
<RelationshipList>
<Relationship id="tapas">
<PropertyList>
<PropertyEntry name="wears" timeUnitsLeft="-1" value="true"/>
</PropertyList>
</Relationship>
</RelationshipList>
</Item>
<Item canGet="true" closeable="false" gender="true" lockable="false" name="nulleitor" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames/>
<PluralNames/>
<SingularReferenceNames/>
<PluralReferenceNames/>
<DescriptionList/>
<ExtraDescriptionList/>
<PropertyList/>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="Llave" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>llave española</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>llave española</Name>
<Name>llave</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>llaves españolas</Name>
<Name>llaves</Name>
<Name>todo</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>Una llave que lleva grabada la bandera de España.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<RelationshipList/>
</Item>
<Item canGet="false" closeable="true" gender="false" lockable="true" name="puerta española" openable="true" unlockable="true" volume="0" weight="0">
<SingularNames/>
<PluralNames/>
<SingularReferenceNames>
<Name>puerta española</Name>
<Name>puerta</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>puertas españolas</Name>
<Name>puertas</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>Una puerta decorada con la bandera de España.\s</Description>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>Está abierta.\s</Description>
<Description>
<Condition language="BeanShell">self.isClosed()</Condition>Está cerrada.\s</Description>
<Description>
<Condition language="BeanShell">self.isLocked()</Condition>Está cerrada con llave.</Description>
<Description>
<Condition language="BeanShell">self.isUnlocked()</Condition>Está abierta con llave.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<OpenDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>FAIL:La puerta ya está abierta.</Description>
<Description>
<Condition language="BeanShell">self.isClosed() &amp;&amp; self.isLocked() &amp;&amp; !actor.hasItem(world.getItem("Llave"))</Condition>FAIL:La puerta está cerrada con llave.</Description>
<Description>
<Condition language="BeanShell">self.isClosed() &amp;&amp; self.isUnlocked()</Condition>SUCCESS:Abres la puerta.</Description>
<Description>
<Condition language="BeanShell">self.isClosed() &amp;&amp; self.isLocked() &amp;&amp; world.getPlayer().hasItem(world.getItem("Llave"))</Condition>SUCCESS:Abres la puerta con la llave.</Description>
</OpenDescriptionList>
<CloseDescriptionList>
<Description>
<Condition language="BeanShell">self.isClosed()</Condition>FAIL:La puerta ya está cerrada.</Description>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:Cierras la puerta.</Description>
</CloseDescriptionList>
<LockDescriptionList>
<Description>
<Condition language="BeanShell">self.isLocked()</Condition>FAIL:La puerta ya está cerrada con llave.</Description>
<Description>
<Condition language="BeanShell">self.isUnlocked()</Condition>SUCCESS:Cierras la puerta con llave.</Description>
</LockDescriptionList>
<UnlockDescriptionList>
<Description>
<Condition language="BeanShell">self.isUnlocked()</Condition>FAIL:La puerta ya está abierta con la llave.</Description>
<Description>
<Condition language="BeanShell">self.isLocked()</Condition>SUCCESS:Abres la puerta con la llave.</Description>
</UnlockDescriptionList>
<PropertyList>
<PropertyEntry name="locked" timeUnitsLeft="-1" value="true"/>
<PropertyEntry name="closed" timeUnitsLeft="-1" value="true"/>
</PropertyList>
<Code language="BeanShell"><![CDATA[/*
M�todo que captura el evento lanzado cuando se ha abierto o intentado abrir este �tem.
*/
void onOpen ( Mobile opener , boolean success )
{
 	
 	//success: indica si se ha realizado con éxito la acción de abrir.
 	//self: cosa que se ha abierto o intentado abrir (es decir, esta cosa).


    if (success) 
    {
        set ( self , "locked" , false );
    }
}

void onLock ( Mobile locker , Item key , boolean success )
{
    if (success) set ( self , "closed" , true );
}]]></Code>
<RelationshipList/>
</Item>
<Item canGet="false" closeable="true" gender="false" lockable="true" name="puerta americana" openable="true" unlockable="true" volume="0" weight="0">
<SingularNames/>
<PluralNames/>
<SingularReferenceNames>
<Name>puerta americana</Name>
<Name>puerta</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>puertas americanas</Name>
<Name>puertas</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>Una puerta decorada con la bandera de los Estados Unidos de América.\s</Description>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>Está abierta.</Description>
<Description>
<Condition language="BeanShell">self.isClosed() &amp;&amp; self.isUnlocked()</Condition>Está cerrada, aunque no con llave.</Description>
<Description>
<Condition language="BeanShell">self.isLocked()</Condition>Está cerrada con llave.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<OpenDescriptionList>
<Description>
<Condition language="BeanShell">self.isClosed() &amp;&amp; self.isLocked()</Condition>FAIL:No puedes abrirla porque está cerrada con llave.</Description>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>FAIL:No tiene sentido abrirla porque ya está abierta.</Description>
<Description>
<Condition language="BeanShell">self.isClosed() &amp;&amp; self.isUnlocked()</Condition>SUCCESS:Abres la puerta americana.</Description>
</OpenDescriptionList>
<CloseDescriptionList>
<Description>
<Condition language="BeanShell">self.isClosed()</Condition>FAIL:No tiene sentido cerrarla porque ya está cerrada.</Description>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:Cierras la puerta americana.</Description>
</CloseDescriptionList>
<LockDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>FAIL:Para cerrarla con llave, primero necesitarías cerrarla. Por algo es americana.</Description>
<Description>
<Condition language="BeanShell">self.isLocked()</Condition>FAIL:No tiene sentido porque ya está cerrada con llave.</Description>
<Description>
<Condition language="BeanShell">self.isClosed() &amp;&amp; self.isUnlocked()</Condition>SUCCESS:Cierras la puerta con llave, o como dirían los anglosajones, la loqueas.</Description>
<Description>
<Condition language="BeanShell">self.isClosed() &amp;&amp; self.isUnlocked()</Condition>FAIL:No parece que encaje en la cerradura.</Description>
</LockDescriptionList>
<UnlockDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>FAIL:No tiene sentido porque está abierta de par en par.</Description>
<Description>
<Condition language="BeanShell">self.isClosed() &amp;&amp; self.isUnlocked()</Condition>FAIL:No tiene sentido porque no está cerrada con llave.</Description>
<Description>
<Condition language="BeanShell">self.isLocked()</Condition>SUCCESS:Abres la cerradura de la puerta, o sea, por decirlo en español macarrónico, la desloqueas.</Description>
<Description>
<Condition language="BeanShell">self.isLocked()</Condition>FAIL:No parece que encaje en la cerradura.</Description>
</UnlockDescriptionList>
<PropertyList>
<PropertyEntry name="closed" timeUnitsLeft="-1" value="true"/>
<PropertyEntry name="locked" timeUnitsLeft="-1" value="true"/>
</PropertyList>
<Code language="BeanShell"><![CDATA[/*
Método que captura el evento lanzado cuando se ha abierto o intentado abrir este ítem con llave.
*/
void onUnlock ( Mobile unlocker , Item key , boolean success )
{
 	
    if ( success )
        unlocker.write("Suena el himno de los Estados Unidos de América en tu honor.\n");
 	  
}]]></Code>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="llave americana" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>llave americana</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>llave americana</Name>
<Name>llave</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>llaves americanas</Name>
<Name>llaves</Name>
<Name>todo</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>Una llave metálica que tiene grabada la bandera de los Estados Unidos de América.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[/*
Método que captura el evento lanzado cuando una criatura coge este ítem.
*/
void onGet ( Mobile getter )
{
    
    getter.write("Hum.\n");
 	
 	//getter: criatura que coge esta cosa.
 	//self: cosa que ha cogido (es decir, esta cosa).
 	  
}]]></Code>
<RelationshipList/>
</Item>
<Item canGet="false" closeable="false" gender="true" lockable="false" name="fregadero" openable="false" unlockable="false" volume="1" weight="0">
<SingularNames>
<Description>fregadero</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>fregadero</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>todo</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>Es un fregadero</Description>
<Description>
<Condition language="BeanShell">self.getContents().size() &gt; 0</Condition>\nEn su interior puedes ver %INVENTORY</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[//fregadero]]></Code>
<Inventory>
<ItemRef id="plato"/>
</Inventory>
<RelationshipList>
<Relationship id="plato">
<PropertyList/>
</Relationship>
</RelationshipList>
</Item>
<Item canGet="true" closeable="false" gender="true" lockable="false" name="plato" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>plato</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>plato</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Es un plato.</Description>
<Description>
<Condition language="BeanShell">self.getContents().size() &gt; 0</Condition>\nEn su interior puedes ver %INVENTORY</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[/*M�todo de an�lisis sint�ctico de la entrada referida a dos cosas, que no est�n dentro de otras*/
/*Este m�todo se ejecuta cuando el jugador invoca una orden sobre dos objetos, que no est�n en contenedores, y el primero de los cuales es �ste.
*/
void parseCommandObj1 ( Mobile aCreature , String verb , String args1 , String args2 , Entity obj2  )
{
	if(equals(verb,"coger")){
    aCreature.write("el plato sale del fregadero.");
    self.moveTo(room("vestuario"));
    end();
    }

}]]></Code>
<Inventory>
<ItemRef id="cuchara"/>
</Inventory>
<RelationshipList>
<Relationship id="cuchara">
<PropertyList/>
</Relationship>
</RelationshipList>
</Item>
<Item canGet="true" closeable="true" gender="false" lockable="false" name="bota" openable="true" unlockable="false" volume="1" weight="0">
<SingularNames>
<Description>bota</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>bota</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>todo</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>Es una bota</Description>
<Description>
<Condition language="BeanShell">IsOpen() &amp;&amp; self.getContents().size() &gt; 0</Condition>\nDentro de la bota puedes ver %INVENTORY</Description>
</DescriptionList>
<ExtraDescriptionList/>
<OpenDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>FAIL:ya esta abierto</Description>
<Description>
<Condition language="BeanShell">!self.isOpen()</Condition>SUCCESS:abres la bota</Description>
</OpenDescriptionList>
<CloseDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>FAIL:No tienes el tape.</Description>
<Description>
<Condition language="BeanShell">!self.isOpen()</Condition>FAIL:ya esta cerradp</Description>
</CloseDescriptionList>
<PropertyList>
<PropertyEntry name="closed" timeUnitsLeft="0" value="true"/>
</PropertyList>
<Inventory/>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="cuchara" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>cuchara</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>cuchara</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Una cuchara</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[/*M�todo de an�lisis sint�ctico de la entrada referida a una cosa*/
void parseCommand( Mobile aCreature , String verb , String args )
{
	
	if(equals(verb,"mover")){
    aCreature.write("mueves la cuchara.\n");
    end();}
	
}]]></Code>
<RelationshipList/>
</Item>
<Item canGet="false" closeable="true" gender="true" lockable="false" name="armario" openable="true" unlockable="false" volume="1" weight="0">
<SingularNames>
<Description>armario</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>armario</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>todo</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>es un armario</Description>
<Description>
<Condition language="BeanShell">isOpen() &amp;&amp; self.getContents().size() &gt; 0</Condition>\nEn su interior puedes ver %INVENTORY</Description>
</DescriptionList>
<ExtraDescriptionList/>
<OpenDescriptionList>
<Description>
<Condition language="BeanShell">self.isClosed()</Condition>SUCCESS:abres el armario</Description>
</OpenDescriptionList>
<CloseDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:cierras el armario</Description>
</CloseDescriptionList>
<PropertyList>
<PropertyEntry name="closed" timeUnitsLeft="0" value="false"/>
</PropertyList>
<Inventory/>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="true" gender="true" lockable="false" name="cajon" openable="true" unlockable="false" volume="1" weight="0">
<SingularNames>
<Description>cajón</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>cajon</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>todo</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>es un cajón</Description>
<Description>
<Condition language="BeanShell">isOpen() &amp;&amp; self.getContents().size() &gt; 0</Condition>\nEn su interior puedes ver %INVENTORY</Description>
</DescriptionList>
<ExtraDescriptionList/>
<OpenDescriptionList>
<Description>
<Condition language="BeanShell">self.isClosed()</Condition>SUCCESS:abres el cajón</Description>
</OpenDescriptionList>
<CloseDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:cierras el cajon</Description>
</CloseDescriptionList>
<PropertyList>
<PropertyEntry name="closed" timeUnitsLeft="0" value="false"/>
</PropertyList>
<Inventory/>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="true" lockable="false" name="sobre" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>sobre</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>sobre</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>un sobre</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList>
<PropertyEntry name="closed" timeUnitsLeft="-1" value="true"/>
</PropertyList>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="true" gender="false" lockable="false" name="matrioska4" openable="true" unlockable="false" volume="4" weight="0">
<SingularNames>
<Description>matrioska4</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>matrioska4</Name>
<Name>4</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Es la más grande de las matrioskas.</Description>
<Description>
<Condition language="BeanShell">self.getContents().size() &gt; 0</Condition>\nEn su interior puedes ver %INVENTORY</Description>
</DescriptionList>
<ExtraDescriptionList/>
<OpenDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:La matrioska4 ya estaba abierta.</Description>
<Description>
<Condition language="BeanShell">!self.isOpen()</Condition>SUCCESS:Abres la matrioska4</Description>
</OpenDescriptionList>
<CloseDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:Cierras la matrioska4</Description>
<Description>
<Condition language="BeanShell">!self.isOpen()</Condition>SUCCESS:La matrioska4 ya estaba cerrada.</Description>
</CloseDescriptionList>
<PropertyList>
<PropertyEntry name="closed" timeUnitsLeft="-1" value="false"/>
</PropertyList>
<Inventory/>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="true" gender="false" lockable="false" name="matrioska3" openable="true" unlockable="false" volume="3" weight="0">
<SingularNames>
<Description>matrioska3</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>matrioska3</Name>
<Name>3</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Es la mediana de las matrioskas.</Description>
<Description>
<Condition language="BeanShell">self.getContents().size() &gt; 0</Condition>\nEn su interior puedes ver %INVENTORY</Description>
</DescriptionList>
<ExtraDescriptionList/>
<OpenDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:La matrioska3 ya estaba abierta.</Description>
<Description>
<Condition language="BeanShell">!self.isOpen()</Condition>SUCCESS:Abres la matrioska3</Description>
</OpenDescriptionList>
<CloseDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:Cierras la matrioska3</Description>
<Description>
<Condition language="BeanShell">!self.isOpen()</Condition>SUCCESS:La matrioska3 ya estaba cerrada.</Description>
</CloseDescriptionList>
<PropertyList>
<PropertyEntry name="closed" timeUnitsLeft="-1" value="false"/>
</PropertyList>
<Inventory/>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="true" gender="false" lockable="false" name="matrioska2" openable="true" unlockable="false" volume="2" weight="0">
<SingularNames>
<Description>matrioska2</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>matrioska2</Name>
<Name>2</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Es la pequeña de las matrioskas.</Description>
<Description>
<Condition language="BeanShell">self.getContents().size() &gt; 0</Condition>\nEn su interior puedes ver %INVENTORY</Description>
</DescriptionList>
<ExtraDescriptionList/>
<OpenDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:La matrioska2 ya estaba abierta.</Description>
<Description>
<Condition language="BeanShell">!self.isOpen()</Condition>SUCCESS:Abres la matrioska2</Description>
</OpenDescriptionList>
<CloseDescriptionList>
<Description>
<Condition language="BeanShell">self.isOpen()</Condition>SUCCESS:Cierras la matrioska2</Description>
<Description>
<Condition language="BeanShell">!self.isOpen()</Condition>SUCCESS:La matrioska2 ya estaba cerrada.</Description>
</CloseDescriptionList>
<PropertyList>
<PropertyEntry name="closed" timeUnitsLeft="-1" value="false"/>
</PropertyList>
<Inventory/>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="pelota" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>pelota</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>pelota</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList/>
<ExtraDescriptionList/>
<PropertyList/>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="true" lockable="false" name="pez" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>pez</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>pez</Name>
</SingularReferenceNames>
<PluralReferenceNames>
<Name>todo</Name>
</PluralReferenceNames>
<DescriptionList>
<Description>Es un pez resbaladizo</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[//balon

/*void parseCommand( Mobile aCreature , String verb , String args )
{
   aCreature.write("Desde pez simple " +verb+"\n");
    
    if(equals(verb,"coger"))
    {aCreature.write("Coges el pez pero se se te cae.....\n");
	  end();}
    
}*/







void parseCommandOnContentsGeneric ( Mobile aCreature , String verb , String args1 , String args2 , Vector path1 , Vector path2 , Entity obj1 , Entity obj2 ,  boolean goesFirst )
{
    //aCreature.write("desde pez on contents "+verb+ " obj2 es "+obj2+"\n");
        
   if(equals(verb,"coger"))
    {aCreature.write("El pez se escurre de las manos y cae al suelo.\n");
	  end();}
    
    if( (equals(verb,"poner")) && (equals(obj2,item("cajon"))) && (aCreature.getRoom().hasItem(item("cajon"))) )
     { aCreature.write("Coges el pez y consigues meterlo en el cajon\n");
       item("cajon").getContents().addItem(item("pez"));
       aCreature.getRoom().getContents().removeItem(item("pez"));
       
       end();}
	
}]]></Code>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="true" lockable="false" name="objeto_patron" openable="false" unlockable="false" volume="0" weight="0">
<SingularNames>
<Description>objeto</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>objeto</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Aquí la descripción del objeto.</Description>
</DescriptionList>
<ExtraDescriptionList>
<ExtraDescription>
<Name>componente</Name>
<DescriptionList>
<Description>Aquí las descripciones de las partes no manipulables del objeto.</Description>
</DescriptionList>
</ExtraDescription>
</ExtraDescriptionList>
<PropertyList>
<PropertyEntry name="amano" timeUnitsLeft="-1" value="true"/>
<PropertyEntry name="inflamable" timeUnitsLeft="-1" value="false"/>
<PropertyEntry name="flota" timeUnitsLeft="-1" value="false"/>
<PropertyEntry name="atadoA" timeUnitsLeft="-1" value="false"/>
<PropertyEntry name="moja" timeUnitsLeft="-1" value="false"/>
<PropertyEntry name="quema" timeUnitsLeft="-1" value="false"/>
<PropertyEntry name="comestible" timeUnitsLeft="-1" value="false"/>
<PropertyEntry name="soporte" timeUnitsLeft="-1" value="false"/>
</PropertyList>
<Code language="BeanShell"><![CDATA[//objeto
// if(equals(verb,"")){aCreature.write("\n"); end();}

//referente a otra cosa y ésta en este orden.
void parseCommandObj2 ( Mobile aCreature , String verb , String args1 , String args2 , Entity obj1  )
{
	//reordenamos la sentencia en el caso de que queramos aplicar la acción a este objeto en vez de al otro. 
    //aCreature.forceCommand(verb +" "+ args2 +" "+ args1);}

   /*if(equals(verb,""))
    {aCreature.write(".\n");
    end();}*/

}
	



	
//referente a esta y otra cosa en este orden
void parseCommandObj1 ( Mobile aCreature , String verb , String args1 , String args2 , Entity obj2  )
{    
    
   /*if(equals(verb,""))
    {aCreature.write(".\n");
    end();}*/


}




//para acciones que implican sólo a este objeto 
void parseCommand( Mobile aCreature , String verb , String args )
{   /*
    if(equals(verb,"tocar")) {aCreature.write(".\n"); end();}
    if(equals(verb,"oler")) {aCreature.write(".\n"); end();}
    if(equals(verb,"coger")) {aCreature.write(".\n"); end();}
    if(equals(verb,"mover")) {aCreature.write(".\n"); end();}
    if(equals(verb,"comer")) {aCreature.write(".\n"); end();}
    if(equals(verb,"romper")) {aCreature.write(".\n"); end();}
    if(equals(verb,"lanzar")) {aCreature.write(".\n"); end();}
    */

//respuesta por defecto.
	//if ( !equals(verb,"mirar")){aCreature.write(".\n"); end();    }

}


/* M�todo para reaccionar a entradas referidas a un componente de esta entidad */
void parseCommandOnComponent( Mobile aCreature , String verb , String args )
{
	//if ( !equals(verb,"mirar") ){aCreature.write(".\n"); end();}
   
 	
}]]></Code>
<RelationshipList/>
</Item>
<Item canGet="true" closeable="false" gender="false" lockable="false" name="matrioska1" openable="false" unlockable="false" volume="1" weight="0">
<SingularNames>
<Description>matrioska1</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>matrioska1</Name>
<Name>1</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Es la diminuta de las matrioskas.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Inventory/>
<RelationshipList/>
</Item>
</Items>
<Mobiles>
<Mobile gender="true" hp="10" maxhp="10" maxmp="10" mp="10" name="pepe">
<SingularNames>
<Description properName="true">pepe</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>pepe</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Es un psi</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Traits>
<SkillList/>
</Traits>
<Inventory/>
<RelationshipList/>
<CurrentRoom id="psis"/>
<LastRoom id="psis"/>
</Mobile>
<Mobile gender="true" hp="0" maxhp="0" maxmp="0" mp="0" name="baby">
<SingularNames>
<Description>personaje</Description>
</SingularNames>
<PluralNames/>
<SingularReferenceNames>
<Name>personaje</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList>
<Description>Eres tú, no lo dudes.</Description>
</DescriptionList>
<ExtraDescriptionList/>
<PropertyList/>
<Code language="BeanShell"><![CDATA[//personaje]]></Code>
<Traits>
<SkillList/>
</Traits>
<Inventory>
<ItemRef id="babuchas"/>
<ItemRef id="tapas"/>
<ItemRef id="sombrero"/>
</Inventory>
<Parts>
<Inventory>
<ItemRef id="pies"/>
<ItemRef id="cuerpo"/>
<ItemRef id="cabeza"/>
</Inventory>
</Parts>
<RelationshipList>
<Relationship id="babuchas">
<PropertyList/>
</Relationship>
<Relationship id="tapas">
<PropertyList/>
</Relationship>
<Relationship id="sombrero">
<PropertyList/>
</Relationship>
<Relationship id="pies">
<PropertyList/>
</Relationship>
<Relationship id="cuerpo">
<PropertyList/>
</Relationship>
<Relationship id="cabeza">
<PropertyList/>
</Relationship>
</RelationshipList>
<CurrentRoom id="vestuario"/>
<LastRoom id="vestuario"/>
</Mobile>
<Mobile gender="true" hp="10" maxhp="10" maxmp="10" mp="10" name="jugador">
<SingularNames/>
<PluralNames/>
<SingularReferenceNames>
<Name>jugador</Name>
<Name>personaje</Name>
<Name>protagonista</Name>
</SingularReferenceNames>
<PluralReferenceNames/>
<DescriptionList/>
<ExtraDescriptionList/>
<PropertyList>
<PropertyEntry name="containedItemsInScope" timeUnitsLeft="-1" value="true"/>
<PropertyEntry name="noPronounDisambiguation" timeUnitsLeft="-1" value="false"/>
<PropertyEntry name="describeRoomsOnArrival" timeUnitsLeft="-1" value="true"/>
<PropertyEntry name="noVerbSpellChecking" timeUnitsLeft="-1" value="false"/>
</PropertyList>
<Code language="BeanShell"><![CDATA[//personaje principal



//Este parseCommand analiza todas y cada una de las entradas del mundo y se ejecuta en primer lugar.
//Es necesario que devuelva un "string" en todos los casos en los que se espera una respuesta, por eso es buena idea añadir un return verb + " " + args; al final.
String parseCommand( String verb , String args )
{
//mobile("personaje").write("comprobando "+mobile("personaje").getRoom()+("\n"));

//Queremos el modo debug. No es una propiedad del jugador pero la ponemos aquí para que se ejecute siempre. 
//Debug.setCodeDebugging(true); 

//Queremos el modo evaluación.
Debug.setEvalEnabled(true);/*eval 1+1eval get ( mobile("jugador") , "cansado" )eval item("puerta roja")isClosed()eval mobile("goblin").hasItem(item("espada"))*/	

//Queremos tener acceso a los objetos que estén dentro de contenedores
//set containedItemsInScope

//prompt
	 if ( self.getIO() instanceof ColoredSwingClient )
	   {  
        int numero = world.getRandom().nextInt();
		  numero=Math.abs(numero) % 10 + 1;
		   switch ( numero )
			{
			case 1: self.getIO().setPrompts("¿Qué hacemos ahora? ",""); break;
			case 2: self.getIO().setPrompts("Te toca a ti.  ",""); break;
			case 3: self.getIO().setPrompts("Es tu turno.  ",""); break;
		    case 4: self.getIO().setPrompts("Espero tus órdenes. ",""); break;
            case 5: self.getIO().setPrompts("Venga colega. ",""); break;
		    case 6: self.getIO().setPrompts("¿Su merced desea algo más? ",""); break;
            case 7: self.getIO().setPrompts("Tú mandas, colegui. ",""); break;
		    case 8: self.getIO().setPrompts("Su señoría tiene la palabra. ",""); break;
		    case 9: self.getIO().setPrompts("¿Qué hacemos, tronco? ",""); break; 
		    case 10:self.getIO().setPrompts("¿Y ahora? ",""); break;            		    
                }
                    }
    //desambiguación de puertas y salidas                
	/*if(equals(args,"puerta")&&(equals(mobile("personaje").getRoom(),room("salon")))){
        mobile("personaje").write("En esta sala hay dos puertas, la puerta de entrada y la puerta verde, repite el comando indicando a cuál de ellas te refieres.\n");
        end();}                    
                    
    //desplazamiento de objetos unidos  
    if(equals("verb","poner")||equals("verb","coger")){
        //funcion que mueve a dos objetos unidos.
    }*/
       //esto lo ponemos porque con este tipo de parseCommand todo ha de devolver un string
      return verb + " " + args;              
}


void parseCommandTwoObjects ( Mobile aCreature , String verb , String args1 , String args2 ,  Entity otherEnt  )
{String args= args1+args2;

     //"quitar" es "coger" por defecto.
     if( equals(verb,"coger")) { 
         //si es "quitar+te el otherEnt" 
        if(args1.contains("personaje") ){ 
            //usamos path2.get(0), porque otherEnt termina siendo el item cuerpo. 
            mobile("personaje").write("otherEnt "+otherEnt.getTitle()+"\n");
    		mobile("personaje").forceCommand("desvestir " + otherEnt);
		      end();} 
 
    }                   
	
}



void parseCommand( Mobile aCreature , String verb , String args )
{
   if(equals(verb,"pesar")&& get(entity("guion"),"entrada_pesate")){
        entity("guion").setProperty("entrada_pesate",true,0);
        end();}
        
    if( equals(verb,"coger")) { 
             if(args.contains("personaje")){
		  mobile("personaje").forceCommand("desvestir " + args);	
		   end();}
    }	

	
}]]></Code>
<Traits>
<SkillList/>
</Traits>
<Inventory>
<ItemRef id="pelota"/>
</Inventory>
<RelationshipList>
<Relationship id="pelota">
<PropertyList/>
</Relationship>
</RelationshipList>
<CurrentRoom id="contenedores"/>
<LastRoom id="contenedores"/>
</Mobile>
</Mobiles>
<Spells/>
<AbstractEntities>
<AbstractEntity name="ayuda">
<PropertyList>
<PropertyEntry name="intro" timeUnitsLeft="-1" value="false"/>
</PropertyList>
<RelationshipList/>
</AbstractEntity>
<AbstractEntity name="media">
<PropertyList>
<PropertyEntry name="sonando" timeUnitsLeft="0" value="archivo.ogg"/>
</PropertyList>
<Code language="BeanShell"><![CDATA[//media

//sustituimos todas las variables de la clase Mobile por el jugador para quitar parámetros.
// Mobile aCreature = world.getPlayerList().get(0)

//Añadir un marco a la derecha : marcoDerecha(mobile, medida);
void marcoDerecha(int medida)
{
    if ( world.getPlayerList().get(0).getIO() instanceof MultimediaInputOutputClient && world.getPlayerList().get(0).getIO().isGraphicsEnabled() )
	  {
		MultimediaInputOutputClient theClient = world.getPlayerList().get(0).getIO();
		world.getPlayerList().get(0).getIO().removeFrames();
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.RIGHT, medida );
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.LEFT , 0 );
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.TOP , 0);
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.BOTTOM , 0);
	   } 
}
//añadir cualquier imagen al marco derecho
void graficoDerecha (String imagen )
{
if ( world.getPlayerList().get(0).getIO() instanceof MultimediaInputOutputClient ) 
{world.getPlayerList().get(0).getIO().useImage ( world.getResource(imagen) , ImageConstants.FRAME , ImageConstants.RIGHT , ImageConstants.FIT_HEIGHT ); } 
}



//Añadir un marco arriba : marcoArriba(mobile, medida);
void marcoArriba( int medida)
{
    if ( world.getPlayerList().get(0).getIO() instanceof MultimediaInputOutputClient && world.getPlayerList().get(0).getIO().isGraphicsEnabled() )
	  {
		MultimediaInputOutputClient theClient = world.getPlayerList().get(0).getIO();
		world.getPlayerList().get(0).getIO().removeFrames();
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.RIGHT, 0 );
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.LEFT , 0 );
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.TOP , medida);
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.BOTTOM , 0);
	   } 
}
//añadir cualquier imagen al marco de arriba
void graficoArriba (String imagen )
{
if ( world.getPlayerList().get(0).getIO() instanceof MultimediaInputOutputClient ) 
{world.getPlayerList().get(0).getIO().useImage ( world.getResource(imagen) , ImageConstants.FRAME , ImageConstants.TOP , ImageConstants.FIT_HEIGHT ); } 
}


                                     

//Añadir un marco a la izquierda : marcoIzquierda(mobile, medida);
void marcoIzquierda(int medida)
{
    if ( world.getPlayerList().get(0).getIO() instanceof MultimediaInputOutputClient && world.getPlayerList().get(0).getIO().isGraphicsEnabled() )
	  {
		MultimediaInputOutputClient theClient = world.getPlayerList().get(0).getIO();
		world.getPlayerList().get(0).getIO().removeFrames();
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.RIGHT, 0 );
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.LEFT , medida );
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.TOP , 0);
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.BOTTOM , 0);
	   } 
}
//añadir cualquier imagen al marco izquierdo
void graficoIzquierda (String imagen )
{
if ( world.getPlayerList().get(0).getIO() instanceof MultimediaInputOutputClient ) 
{world.getPlayerList().get(0).getIO().useImage ( world.getResource(imagen) , ImageConstants.FRAME , ImageConstants.LEFT , ImageConstants.FIT_HEIGHT ); } 
}



//Añadir un marco abajo : marcoAbajo(mobile, medida);
void marcoAbajo(int medida)
{
    if ( world.getPlayerList().get(0).getIO() instanceof MultimediaInputOutputClient && world.getPlayerList().get(0).getIO().isGraphicsEnabled() )
	  {
		MultimediaInputOutputClient theClient = world.getPlayerList().get(0).getIO();
		world.getPlayerList().get(0).getIO().removeFrames();
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.RIGHT, 0 );
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.LEFT , 0 );
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.TOP , 0);
		world.getPlayerList().get(0).getIO().addFrame ( ImageConstants.BOTTOM , medida);
	   } 
}

//añadir cualquier imagen al marco inferior
void graficoAbajo ( String imagen )
{
if ( world.getPlayerList().get(0).getIO() instanceof MultimediaInputOutputClient ) 
{world.getPlayerList().get(0).getIO().useImage ( world.getResource(imagen) , ImageConstants.FRAME , ImageConstants.BOTTOM , ImageConstants.FIT_HEIGHT ); } 
}

//despejar pantalla
void borrar ()
{
    world.getPlayerList().get(0).write("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
}

//sonido

void audio(String archivo)
{world.getPlayerList().get(0).playAudioIfAvailable(world.getResource(archivo));
set(self,"sonando","archivo");}

void midi(String archivo)
{world.getPlayerList().get(0).playMidiIfAvailable(world.getResource(archivo));
set(self,"sonando","archivo");}]]></Code>
<RelationshipList/>
</AbstractEntity>
<AbstractEntity name="fisica">
<PropertyList/>
<Code language="BeanShell"><![CDATA[//fisica


void poniendo (Entity obj1, Entity obj2)
{
	world.getPlayerList().get(0).removeItem(obj1); 
    obj2.getContents().addItem(obj1); 
    //la frase a imprimir se pone en la captura de la acción poner.
}

	
void sacando (Entity obj1, Entity obj2)
{   
    obj2.getContents().removeItem(obj1);
    world.getPlayerList().get(0).addItem(obj1);
    //la frase a imprimir se pone en la captura de la acción sacar.
}]]></Code>
<RelationshipList/>
</AbstractEntity>
</AbstractEntities>
</World>
